home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 25
/
Mac Magazin and MacEasy Magazine CD - Issue 25.iso
/
Grafik & Text
/
Alpha
/
Tcl
/
Menus
/
toolboxAssistMenu.tcl
< prev
Wrap
Text File
|
1996-08-15
|
2KB
|
85 lines
#================================================================================
# QuickView™ Toolbox Assistant Help
#================================================================================
if $startingUp {
set toolboxRefMenu "•400"
addMenu toolboxRefMenu
return
}
proc toolboxRefMenu {} {}
menu -m -n $toolboxRefMenu -p toolboxProc {
"Goto Reference"
"(-"
"Display Trap Template"
"Insert Trap Template"
"/L<O<ULookup Trap"
}
proc toolboxProc {menu item} {
switch $item {
"Goto Reference" { gotoTBReference }
"Display Trap Template" { displayTBTrapTemplate }
"Insert Trap Template" { insertTBTrapTemplate }
"Lookup Trap" { lookupTBTrap }
}
}
set lastTrap {}
proc insertTBTrapTemplate {} {
global lastTrap
if {![string length [checkRunning QuickView™ ALTV tassPath]]} return
set text [getSelect]
if {![string length $text]} {
if {[catch {prompt "Trap name:" $lastTrap} text]} return
} else {
deleteText [getPos] [selEnd]
}
set lastTrap $text
set res [AEBuild -r {'ALTV'} DanR {TMPL} "----" "“$text”"]
regexp {“.*”} $res one
insertText [string trim $one {“”}]
}
proc displayTBTrapTemplate {} {
global lastTrap
if {![string length [checkRunning QuickView™ ALTV tassPath]]} return
set text {}
catch {set text [getSelect]}
if {![string length $text]} {
if {[catch {prompt "Trap name:" $lastTrap} text]} return
}
set lastTrap $text
set res [AEBuild -r {'ALTV'} DanR {TMPL} "----" "“$text”"]
regexp {“.*”} $res one
alertnote [string trim $one {“”}]
}
proc lookupTBTrap {} {
global lastTrap
if {![string length [checkRunning QuickView™ ALTV tassPath]]} return
set text {}
catch {set text [getSelect]}
if {![string length $text]} {
if {[catch {prompt "Trap name:" $lastTrap} text]} return
}
set lastTrap $text
AEBuild {'ALTV'} DanR {REF } "----" "“$text”"
}
proc gotoTBReference {} {
catch {switchTo [checkRunning QuickView™ ALTV tassPath]}
}